######

READ ME

This folder contains replication material for York, Erin. “Constituency Service and Electoral Accountability in Autocratic Legislatures” (2024). Comparative Political Studies. 

Please cite the published article when utilizing these files.


## Description of files

# Code files

02_rep_maintext.R : This r file contains code to generate all data-generated figures and tables in the main text.

03_rep_supplementary.R : This r file contains code to generate data-generated figures and tables in the supplementary appendix, with the exception of Figure A4 and Table A15.

04_rep_external.R : This r file contains code to generate Figure A4 and Table A15. Note that this requires the separate download of geocoded Afrobarometer data (see instructions below).


# Data files

df_country_panel.csv : This dataset contains cross-national panel data at the country-year level. This merges indicators from the Varieties of Democracy project (see latest dataset here: https://www.v-dem.net/data/the-v-dem-dataset/) and the 2017 Database of Political Institutions (see latest dataset here: https://datacatalog.worldbank.org/search/dataset/0039819/Database-of-Political-Institutions). URLs current as of May 30, 2024.

df_querylevel.csv : This dataset contains information on written queries submitted by Moroccan Members of Parliament during the 2011-2016 legislative term. Data are at the level of the individual query and include information on the submitting party, subject, date submitted, and content of the query.

df_mplevel.csv : This dataset contains information on participants in the 2011-2016 legislative session in Morocco. Data are at the level of the individual Member of Parliament (MP) and include information about party, leadership roles, experience, constituency, and activity while in office.

df_partylevel.csv : This dataset contains information on legislative activity and electoral outcomes at the party-legislative district level. Data include electoral outcomes from the 2011 and 2016 cycles as well as information on written and oral queries submitted by partisan representatives of each district during the 2011-2016 term. The data also include demographic information on legislative districts, aggregated from the 2014 census.

df_munilevel.csv : This dataset contains information on legislative activity and municipal (communal) electoral outcomes at the party-municipal district level. Data include electoral information from the 2009 and 2015 municipal elections, as well as information on the number of written queries submitted by party representatives referencing the municipality.

df_afrolink.csv : This dataset contains linking variables required to merge geocoded Afrobarometer data with municipal-level demographic data from the Moroccan census as well as number of legislative queries referencing the municipality.


## Additional data access

Please note that some of the data used in analysis are restricted access geocoded survey data from the Afrobarometer Round 6 for Morocco. More information is available at https://www.afrobarometer.org/survey-resource/geocoded-data/. To access these data, submit a request form via url: https://www.afrobarometer.org/contact-us/data-requests/. URLs current as of May 30, 2024. This data file is required to run the code in 04_rep_external.R; all other code files can be run without it.


## Description of analysis

The analysis was conducted using R version 4.3.1.